<?php
$tdatappcategory=array();
	$tdatappcategory[".ShortName"]="ppcategory";
	$tdatappcategory[".OwnerID"]="";
	$tdatappcategory[".OriginalTable"]="ppcategory";


	
//	field labels
$fieldLabelsppcategory = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsppcategory["English"]=array();
	$fieldToolTipsppcategory["English"]=array();
	$fieldLabelsppcategory["English"]["CategoryID"] = "CategoryID";
	$fieldToolTipsppcategory["English"]["CategoryID"] = "";
	$fieldLabelsppcategory["English"]["CategoryName"] = "CategoryName";
	$fieldToolTipsppcategory["English"]["CategoryName"] = "";
	if (count($fieldToolTipsppcategory["English"])){
		$tdatappcategory[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="Spanish")
{
	$fieldLabelsppcategory["Spanish"]=array();
	$fieldToolTipsppcategory["Spanish"]=array();
	$fieldLabelsppcategory["Spanish"]["CategoryID"] = "CategoryID";
	$fieldToolTipsppcategory["Spanish"]["CategoryID"] = "";
	$fieldLabelsppcategory["Spanish"]["CategoryName"] = "CategoryName";
	$fieldToolTipsppcategory["Spanish"]["CategoryName"] = "";
	if (count($fieldToolTipsppcategory["Spanish"])){
		$tdatappcategory[".isUseToolTips"]=true;
	}
}


	

	

$tdatappcategory[".shortTableName"] = "ppcategory";
$tdatappcategory[".nSecOptions"] = 0;
$tdatappcategory[".recsPerRowList"] = 1;	
$tdatappcategory[".tableGroupBy"] = "0";
$tdatappcategory[".mainTableOwnerID"] = "";
$tdatappcategory[".moveNext"] = 1;




$tdatappcategory[".showAddInPopup"] = false;

$tdatappcategory[".showEditInPopup"] = false;

$tdatappcategory[".showViewInPopup"] = false;


$tdatappcategory[".fieldsForRegister"] = array();

$tdatappcategory[".listAjax"] = false;

	$tdatappcategory[".audit"] = true;

	$tdatappcategory[".locking"] = false;
	
$tdatappcategory[".edit"] = true;
$tdatappcategory[".inlineEdit"] = true;
$tdatappcategory[".view"] = true;

$tdatappcategory[".exportTo"] = true;

$tdatappcategory[".printFriendly"] = true;

$tdatappcategory[".delete"] = true;

$tdatappcategory[".showSimpleSearchOptions"] = false;

$tdatappcategory[".showSearchPanel"] = true;


$tdatappcategory[".isUseAjaxSuggest"] = true;



// button handlers file names

$tdatappcategory[".addPageEvents"] = false;

$tdatappcategory[".arrKeyFields"][] = "CategoryID";

// use datepicker for search panel
$tdatappcategory[".isUseCalendarForSearch"] = false;

// use timepicker for search panel
$tdatappcategory[".isUseTimeForSearch"] = false;

$tdatappcategory[".isUseiBox"] = false;


	

	


$tdatappcategory[".isUseInlineAdd"] = true;

$tdatappcategory[".isUseInlineEdit"] = true;
$tdatappcategory[".isUseInlineJs"] = $tdatappcategory[".isUseInlineAdd"] || $tdatappcategory[".isUseInlineEdit"];

$tdatappcategory[".allSearchFields"] = array();

$tdatappcategory[".globSearchFields"][] = "CategoryName";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("CategoryName", $tdatappcategory[".allSearchFields"]))
{
	$tdatappcategory[".allSearchFields"][] = "CategoryName";	
}


$tdatappcategory[".googleLikeFields"][] = "CategoryID";
$tdatappcategory[".googleLikeFields"][] = "CategoryName";



$tdatappcategory[".advSearchFields"][] = "CategoryID";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("CategoryID", $tdatappcategory[".allSearchFields"])) 
{
	$tdatappcategory[".allSearchFields"][] = "CategoryID";	
}
$tdatappcategory[".advSearchFields"][] = "CategoryName";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("CategoryName", $tdatappcategory[".allSearchFields"])) 
{
	$tdatappcategory[".allSearchFields"][] = "CategoryName";	
}

$tdatappcategory[".isTableType"] = "list";


	



// Access doesn't support subqueries from the same table as main
$tdatappcategory[".subQueriesSupAccess"] = true;





$tdatappcategory[".pageSize"] = 20;

$gstrOrderBy = "";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdatappcategory[".strOrderBy"] = $gstrOrderBy;
	
$tdatappcategory[".orderindexes"] = array();

$tdatappcategory[".sqlHead"] = "select `CategoryID`,   `CategoryName`";
$tdatappcategory[".sqlFrom"] = "From `ppcategory`";
$tdatappcategory[".sqlWhereExpr"] = "";
$tdatappcategory[".sqlTail"] = "";




//fill array of records per page for list and report without group fields
$arrRPP = array();
$arrRPP[] = 10;
$arrRPP[] = 20;
$arrRPP[] = 30;
$arrRPP[] = 50;
$arrRPP[] = 100;
$arrRPP[] = 500;
$arrRPP[] = -1;
$tdatappcategory[".arrRecsPerPage"] = $arrRPP;

//fill array of groups per page for report with group fields
$arrGPP = array();
$arrGPP[] = 1;
$arrGPP[] = 3;
$arrGPP[] = 5;
$arrGPP[] = 10;
$arrGPP[] = 50;
$arrGPP[] = 100;
$arrGPP[] = -1;
$tdatappcategory[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "CategoryID";
	$tdatappcategory[".Keys"] = $tableKeys;

//	CategoryID
	$fdata = array();
	$fdata["strName"] = "CategoryID";
	$fdata["ownerTable"] = "ppcategory";
	$fdata["Label"]=GetFieldLabel("ppcategory","CategoryID"); 
	
		
		
	$fdata["FieldType"]= 3;
	
		$fdata["AutoInc"]=true;
	
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "CategoryID";
	
		$fdata["FullName"]= "`CategoryID`";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		
		
		
		
		
		
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				
		
				
		
		
		
			$tdatappcategory["CategoryID"]=$fdata;
//	CategoryName
	$fdata = array();
	$fdata["strName"] = "CategoryName";
	$fdata["ownerTable"] = "ppcategory";
	$fdata["Label"]=GetFieldLabel("ppcategory","CategoryName"); 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "CategoryName";
	
		$fdata["FullName"]= "`CategoryName`";
	
		
		
		
		
		
				$fdata["Index"]= 2;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=30";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatappcategory["CategoryName"]=$fdata;


	
$tables_data["ppcategory"]=&$tdatappcategory;
$field_labels["ppcategory"] = &$fieldLabelsppcategory;
$fieldToolTips["ppcategory"] = &$fieldToolTipsppcategory;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["ppcategory"] = array();

	
// tables which are master tables for current table (detail)
$masterTablesData["ppcategory"] = array();

// -----------------end  prepare master-details data arrays ------------------------------//

require_once(getabspath("classes/sql.php"));










function createSqlQuery_ppcategory()
{
$proto0=array();
$proto0["m_strHead"] = "select";
$proto0["m_strFieldList"] = "`CategoryID`,   `CategoryName`";
$proto0["m_strFrom"] = "From `ppcategory`";
$proto0["m_strWhere"] = "";
$proto0["m_strOrderBy"] = "";
$proto0["m_strTail"] = "";
$proto1=array();
$proto1["m_sql"] = "";
$proto1["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto1["m_column"]=$obj;
$proto1["m_contained"] = array();
$proto1["m_strCase"] = "";
$proto1["m_havingmode"] = "0";
$proto1["m_inBrackets"] = "0";
$proto1["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto1);

$proto0["m_where"] = $obj;
$proto3=array();
$proto3["m_sql"] = "";
$proto3["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto3["m_column"]=$obj;
$proto3["m_contained"] = array();
$proto3["m_strCase"] = "";
$proto3["m_havingmode"] = "0";
$proto3["m_inBrackets"] = "0";
$proto3["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto3);

$proto0["m_having"] = $obj;
$proto0["m_fieldlist"] = array();
						$proto5=array();
			$obj = new SQLField(array(
	"m_strName" => "CategoryID",
	"m_strTable" => "ppcategory"
));

$proto5["m_expr"]=$obj;
$proto5["m_alias"] = "";
$obj = new SQLFieldListItem($proto5);

$proto0["m_fieldlist"][]=$obj;
						$proto7=array();
			$obj = new SQLField(array(
	"m_strName" => "CategoryName",
	"m_strTable" => "ppcategory"
));

$proto7["m_expr"]=$obj;
$proto7["m_alias"] = "";
$obj = new SQLFieldListItem($proto7);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto9=array();
$proto9["m_link"] = "SQLL_MAIN";
			$proto10=array();
$proto10["m_strName"] = "ppcategory";
$proto10["m_columns"] = array();
$proto10["m_columns"][] = "CategoryID";
$proto10["m_columns"][] = "CategoryName";
$obj = new SQLTable($proto10);

$proto9["m_table"] = $obj;
$proto9["m_alias"] = "";
$proto11=array();
$proto11["m_sql"] = "";
$proto11["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto11["m_column"]=$obj;
$proto11["m_contained"] = array();
$proto11["m_strCase"] = "";
$proto11["m_havingmode"] = "0";
$proto11["m_inBrackets"] = "0";
$proto11["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto11);

$proto9["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto9);

$proto0["m_fromlist"][]=$obj;
$proto0["m_groupby"] = array();
$proto0["m_orderby"] = array();
$obj = new SQLQuery($proto0);

return $obj;
}
$queryData_ppcategory = createSqlQuery_ppcategory();
$tdatappcategory[".sqlquery"] = $queryData_ppcategory;



$tableEvents["ppcategory"] = new eventsBase;
$tdatappcategory[".hasEvents"] = false;

?>
